/*
 * Sprite.h
 * object with attached physics component and necessary texturing information
 *  Created on: Oct 9, 2012
 *      Author: pigmal
 */

#ifndef SPRITE_H_
#define SPRITE_H_

#include "GraphicsComponent.h"
#include "PhysicsComponent.h"
#include "Plane.h"
#include "Texture.h"

class Sprite:public GraphicsComponent
{
public:
	Sprite();
	virtual ~Sprite();

	bool Init(PhysicsComponent *body, Texture *texture);

	MAHandle GetResource(){return Resource;}
	GLuint GetTextureHandle(){return TexHandle;}
	PhysicsComponent *GetPhysBody(){return Body;}
	GLenum GetTargetValue(){return TexTarget;}

	void update();

private:
	Texture	*TextureObj;
	MAHandle Resource;
	PhysicsComponent *Body;
	GLuint TexHandle;
	GLenum TexTarget;
	Plane	PlaneObj;
};
#endif /* SPRITE_H_ */
